import React, { useEffect } from 'react'
import style from './style.module.scss'
import { StarOutlined } from '@ant-design/icons'

interface IVipCardProps {
    phoneNum: string
}

export default function VipCard(props: IVipCardProps) {
    useEffect(() => {
        console.log()
    })

    const changePhoneNum = () => {
        const newPhoneNum = props.phoneNum.slice(0, 3) + '****' + props.phoneNum.slice(7, 11)
        return newPhoneNum
    }

    return (
        <div className={style.vip__card}>
            <span>{changePhoneNum()}</span>
            <span className={style.vip__consume__num}>14678</span>
            <span className={style.vip__consume}>累计消费</span>
            <span className={style.vip__id}>NO.{'39fb86b8 e338 f825 0b32 b6e1f195b877'}</span>
            <StarOutlined className={style.hint} />
        </div>
    )
}
